<script>
	$(function() {
		var selectedValue = "${model.accountType!""}";
		accountTypeChange(selectedValue);
	});
	
	function accountTypeChange(value) {
		if (value == "PERSONAL") {
			$(".personalField").removeClass("hidden");
			$(".companyField").addClass("hidden");
		} else if (value == "ENTERPRISE") {
			$(".personalField").addClass("hidden");
			$(".companyField").removeClass("hidden");
		}
	}
</script>
<div class="ibox">
    	<div class="ibox-content">
    		<div class="pageContent">
    			<form class="form-horizontal m-t" id="ajaxForm" method="post" action="${basePath }/admin/memberInfo/update.do" >
    				<input type="hidden" name="id" value="${model.id}"/>
    				<div class="pageFormContent">
    					<div class="form-group col-md-12 col-sm-12">
							<label class="col-md-2 col-sm-2 control-label">账户类型：</label>
							<div class="col-md-10 col-sm-10">
								<input class="form-control" name="lookupAccountType" value="${model.accountType.desc!""}" type="text" readonly/>
							</div>
						</div>
							<div class="form-group col-md-12 col-sm-12">
								<label class="col-md-2 col-sm-2 control-label"> 用户名：</label>
								<div class="col-md-10 col-sm-10">
									<input class="form-control" name="userName" value="${model.userName!""}" type="text" required aria-required="true" aria-invalid="true"/>
								</div>
							</div>
						<div class="personalField hidden">
							<div class="form-group col-md-12 col-sm-12">
								<label class="col-md-2 col-sm-2 control-label">真实姓名：</label>
								<div class="col-md-10 col-sm-10">
									<input class="form-control" name="personalName" value="${model.personalName!""}" type="text" required aria-required="true" aria-invalid="false" />
								</div>
							</div>
							<div class="form-group col-md-12 col-sm-12">
								<label class="col-md-2 col-sm-2 control-label"> 手机号：</label>
								<div class="col-md-10 col-sm-10">
									<input class="form-control" name="personalMobile" value="${model.personalMobile!""}" type="text" required aria-required="true" aria-invalid="false" />
								</div>
							</div>
							<div class="form-group col-md-12 col-sm-12">
								<label class="col-md-2 col-sm-2 control-label">  邮箱：</label>
								<div class="col-md-10 col-sm-10">
									<input class="form-control" name="personalEmail" value="${model.personalEmail!""}" type="text" />
								</div>
							</div>
							<div class="form-group col-md-12 col-sm-12">
								<label class="col-md-2 col-sm-2 control-label">  身份证：</label>
								<div class="col-md-10 col-sm-10">
									<input class="form-control" name="personalIdCard" value="${model.personalIdCard!""}" type="text" />
								</div>
							</div>
						</div>
						<div class="companyField hidden">
							<div class="form-group col-md-12 col-sm-12">
								<label class="col-md-2 col-sm-2 control-label"> 公司名：</label>
								<div class="col-md-10 col-sm-10">
									<input class="form-control" name="companyName" value="${model.companyName!""}" type="text" />
								</div>
							</div>
							<div class="form-group col-md-12 col-sm-12">
								<label class="col-md-2 col-sm-2 control-label">营业执照编号：</label>
								<div class="col-md-10 col-sm-10">
									<input class="form-control" name="companyNo" value="${model.companyNo!""}" type="text" />
								</div>
							</div>
							<div class="form-group col-md-12 col-sm-12">
								<label class="col-md-2 col-sm-2 control-label">电话：</label>
								<div class="col-md-10 col-sm-10">
									<input class="form-control" name="companyTel" value="${model.companyTel!""}" type="text" />
								</div>
							</div>
						</div>
    				</div>
    				<div class="formBar">
						<div class="ibox-content">
    						<button class="btn btn-primary pull-right" option="ajaxForm" >保存</button>
							<button type="button" class="btn btn-danger pull-right" data-dismiss="modal">取消</button>
						</div>
					</div>
    			</form>
    		</div>
    	</div>
    </div>
</div>
<!-- 引入事件绑定 -->
<script src="${basePath }/public/js/viewBind.js"></script>